package com.cy.mall.model.doc;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import com.cy.mall.model.enums.SmsType;

import java.util.Date;

/**
 * @description: 短信记录
 * @author: Ocean
 * @create: 2018-08-02 19:08
 **/
@Data
@Document(collection = "sms_record")
@CompoundIndexes({
        @CompoundIndex(name = "idx_time", def = "{'createTime': -1}")
})
public class SmsRecord {

    @Id
    private String id;

    @Indexed
    private String mobile;

    private SmsType type;

    private String context;

    private String status;

    private Date createTime;

}
